package com.teemor.gateway.fallback;

import com.alibaba.fastjson.JSON;
import com.teemor.common.bean.utils.enums.ResultCode;
import com.teemor.common.bean.utils.tmpl.ResponseBen;
import lombok.Data;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @author zhoulk
 * @date: 2020/4/4
 */
@RestController
public class FallBackFactory {

    @RequestMapping(value = "/fallback")
    public String fallback(){
        ResponseBen responseBen =new ResponseBen(ResultCode.FAILED.value(),"服务器开小差了，等会再试试",null);
        return JSON.toJSONString(responseBen);
    }


}
